package com.bjdd.jdy.ui.working;

import com.bjdd.jdy.base.BaseModel;
import com.bjdd.jdy.base.BasePresenter;
import com.bjdd.jdy.base.BaseResult;
import com.bjdd.jdy.base.BaseView;
import com.bjdd.jdy.entity.OrderBean;
import com.bjdd.jdy.entity.OrderResult;
import com.bjdd.jdy.entity.User;
import com.bjdd.jdy.entity.result.TodayDataResult;

import java.util.List;

import rx.Observable;

/**
 * Created by Administrator on 2017/5/2.
 */

public interface WorkingContract {
    interface Model extends BaseModel{
        Observable<BaseResult<TodayDataResult>> getTodayData(String token, String userId);
        Observable<BaseResult<String>> start(String token,String carrierId);
        Observable<BaseResult<String>> stop(String token,String carrierId);
        Observable<BaseResult<OrderResult>> queryWaitOrder(String token,String cityName,int page,int size);
        Observable<BaseResult<OrderResult>> queryOrder(String token,String carrierId,int type,int page,int size);
        Observable<BaseResult<String>> grab(String token,String carrierId,long orderId);
    }
    interface View extends BaseView{
        void todatData(TodayDataResult result);
        void startWorkBack();
        void stopWorkBack();
        void orderBack(int type,List<OrderBean> list);
        void grabBack();
        void showGrapDialog(long orderId);
        void loadingError();
    }
    abstract class Presenter extends BasePresenter<WorkingContract.Model,WorkingContract.View>{
        abstract void getTodayData();
        abstract void startWork();
        abstract void finshWork();
        abstract void queryWaitOrder(int page,int size);
        abstract void queryOrder(int type,int page,int size);
        abstract void onPause();
    }
}
